package com.whmskj.xjlhsc.mobie.ProductionManagement.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.whmskj.xjlhsc.controller.vo.Result;
import com.whmskj.xjlhsc.mobie.ProductionManagement.pojo.dto.getDataListDTO;
import com.whmskj.xjlhsc.mobie.ProductionManagement.pojo.vo.YiQianJiReportVO;
import com.whmskj.xjlhsc.mobie.ProductionManagement.pojo.vo.DifferentFiberRemovalMachineVO;
import com.whmskj.xjlhsc.mobie.ProductionManagement.pojo.vo.YiQianJiVVO;
import com.whmskj.xjlhsc.mobie.ProductionManagement.service.IStrangeFiberDailyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author jiaruchun
 * @date 2025-08-26 09:12
 * 异纤机日报告
 */
@SaIgnore
@RestController
@Api(tags = "异纤机日报告接口")
@RequestMapping("/mobile/ProductionManagement/strangeFiberDaily")
public class StrangeFiberDailyController {

    @Autowired
    private IStrangeFiberDailyService iStrangeFiberDailyService;

    @ApiOperation(value = "查询异纤机机号列表",notes = "返回异纤机机号列表")
    @GetMapping
    public Result getStrangeFiberDailyReport() {
        List<DifferentFiberRemovalMachineVO> strangeFiberDailyReport = iStrangeFiberDailyService.getStrangeFiberDailyReport();
        return Result.success(strangeFiberDailyReport);
    }

    @PostMapping
    @ApiOperation(value = "根据时间和异纤机MesId查询异纤机日报告详情",notes = "返回异纤机日报告详情")
    public Result getDataList(@RequestBody getDataListDTO getDataListDTO) {
            Long id = Long.parseLong(getDataListDTO.getId());
            YiQianJiVVO dataList = iStrangeFiberDailyService.getDataList(getDataListDTO.getTime(), id);
            return Result.success(dataList);
    }
}